<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>帮助中心</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/swiper.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/layer.css" />
    <link rel="stylesheet" type="text/css" href="../css/mdw.css" />
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../script/swiper.min.js"></script>
    <script type="text/javascript" src="../script/mobile.js"></script>
    <script type="text/javascript" src="../script/layer.js"></script>
    <script type="text/javascript" src="../script/mdw.js"></script>
    <script type="text/javascript" src="../script/jumpPage.js"></script>

</head>
<body class="">
    <header class="header">
        <div class="backPrevPage on" onclick="historyBack()"></div>
        <div class="pageTitle">帮助中心</div>
        
    </header>
    <section class="loginBox HTML_BOX">
        <div class="bg-eee" style="border-bottom:.2rem solid #EEE ; "></div>
        <ul class=" help plr bg-fff">
            <!-- <li class="">
                <div class="help_title displayFlex"> 
                    <span>购物指南</span>
                   <i></i>
               </div>
               <div class="help_son">
                   <div class="son_title displayFlex"> 
                    <span>购物指南</span>
                   <i></i>
                    </div>
                    <div class="son_title displayFlex"> 
                    <span>购物指南</span>
                   <i></i>
                    </div>
               </div>
            </li> -->
            
        </ul>
       <div style="font-size: 0.28rem;color: #888;margin-top: 0.4rem;width: 100%;text-align: center;" >Copyright © 2018 - 2019</div>
       <div style="font-size: 0.28rem;color: #888;margin-top: 0.05rem;width: 100%;text-align: center;">Haveit.ca 版权所有</div>
    </section>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">

    apiready = function(){
        $api.fixStatusBar($api.dom('header'));
        api.setStatusBarStyle({
            color: '#fff',//设置APP状态栏背景色
            style: 'dark'
        });
        ifCnAndEn();
        ready();
    };
    function ready(){
        getAjax(Interface.help_center,{},function(res){
            help = res.data;
            $.each(res.data,function(i,item){
                var son_list = item.son_list;
                if(cnen==2){
                    item.title=item.egname;
                }
                var html='<li class="">';
                    html+='<div onclick="go_mode2(this,'+i+')" data-type="hide" class="help_title displayFlex">';
                       html+=' <span>'+item.title+'</span><i></i>';
                   html+='</div>';
                   if(son_list){
                    html+='<div style="display:none;" class="help_son mode_'+i+'">';
                        $.each(son_list,function(j,jtem){
                            if(jtem.title =="商品分类" || jtem.title =="商家列表" ){
                                return true;
                            }
                            if(cnen==2){
                                jtem.title=jtem.egname;
                            }
                                html+='<div onclick="go_mode('+j+',2,'+i+')" class="son_title displayFlex"> ';
                                html+='<span>'+jtem.title+'</span><i></i>';
                                html+=' </div>';
                        })
                        html+=' </div>';
                   }
            html+='</li>';
                $(".help").append(html);
            })
        },function(res,err){})
    }
    function go_mode(i,index,j){
        var p = help[0];
        if(index==1){
            p = help[i];
        }else{
            p = help[j].son_list[i];
        }
        console.log(JSON.stringify(p));
        
        if(p.id == 39){
            openWin('help_question','help_question.html');
        }else{
            openWin('help_peisongMode','help_peisongMode.html',p);
        }
    }
    function go_mode2(e,i){
        var type = $(e).data("type");
        if(type == "hide"){
            $(".mode_"+i).fadeIn();
            $(e).data("type","show");
        }else{
            $(e).data("type","hide");
            $(".mode_"+i).fadeOut();
        }
    }
    
</script>
<script type="text/javascript">
    function ifCnAndEn(){
        if(cnen==2){
            $(".pageTitle").eq(0).html('Help Center');           
        }
    }
</script>
</html>